# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GroundingSupport do
  @moduledoc """
  Grounding support.

  ## Attributes

  *   `confidenceScores` (*type:* `list(number())`, *default:* `nil`) - Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.
  *   `groundingChunkIndices` (*type:* `list(integer())`, *default:* `nil`) - A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.
  *   `segment` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Segment.t`, *default:* `nil`) - Segment of the content this support belongs to.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :confidenceScores => list(number()) | nil,
          :groundingChunkIndices => list(integer()) | nil,
          :segment => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Segment.t() | nil
        }

  field(:confidenceScores, type: :list)
  field(:groundingChunkIndices, type: :list)
  field(:segment, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Segment)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GroundingSupport do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GroundingSupport.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GroundingSupport do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
